<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="lib.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python documentation Index' />
<link rel="first" href="lib.html" title='Python library Reference' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="next" href="node160.html" />
<link rel="prev" href="module-email.iterators.html" />
<link rel="parent" href="module-email.html" />
<link rel="next" href="node160.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name='aesop' content='information' />
<title>7.1.11 Package History</title>
</head>
<body>
<div class="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="7.1.10 Iterators"
  href="module-email.iterators.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="7.1 email  "
  href="module-email.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="7.1.12 differences from mimelib"
  href="node160.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-email.iterators.html">7.1.10 Iterators</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-email.html">7.1 email  </a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="node160.html">7.1.12 Differences from mimelib</a>
</div>
<hr /></div>
</div>
<!--End of Navigation Panel-->

<h2><a name="SECTION0091110000000000000000"></a><a name="email-pkg-history"></a>
<br>
7.1.11 Package History
</h2>

<p>
This table describes the release history of the email package, corresponding
to the version of Python that the package was released with.  For purposes of
this document, when you see a note about change or added versions, these refer
to the Python version the change was made it, <em>not</em> the email package
version.  This table also describes the Python compatibility of each version
of the package.

<p>
<div class="center"><table class="realtable">
  <thead>
    <tr>
      <th class="left"  >email version</th>
      <th class="left"  >distributed with</th>
      <th class="left"  >compatible with</th>
      </tr>
    </thead>
  <tbody>
    <tr><td class="left"   valign="baseline"><tt class="constant">1.x</tt></td>
        <td class="left"  >Python 2.2.0 to Python 2.2.1</td>
        <td class="left"  ><em>no longer supported</em></td></tr>
    <tr><td class="left"   valign="baseline"><tt class="constant">2.5</tt></td>
        <td class="left"  >Python 2.2.2+ and Python 2.3</td>
        <td class="left"  >Python 2.1 to 2.5</td></tr>
    <tr><td class="left"   valign="baseline"><tt class="constant">3.0</tt></td>
        <td class="left"  >Python 2.4</td>
        <td class="left"  >Python 2.3 to 2.5</td></tr>
    <tr><td class="left"   valign="baseline"><tt class="constant">4.0</tt></td>
        <td class="left"  >Python 2.5</td>
        <td class="left"  >Python 2.3 to 2.5</td></tr></tbody>
</table></div>

<p>
Here are the major differences between <tt class="module">email</tt> version 4 and version 3:

<p>

<ul>
<li>All modules have been renamed according to <a class="rfc" id='rfcref-99417' xml:id='rfcref-99417'
href="http://www.python.org/peps/pep-0008.html">PEP 8</a> standards.  For
      example, the version 3 module <tt class="module">email.Message</tt> was renamed to
      <tt class="module">email.message</tt> in version 4.

<p>
</li>
<li>A new subpackage <tt class="module">email.mime</tt> was added and all the version 3
      <tt class="module">email.MIME*</tt> modules were renamed and situated into the
      <tt class="module">email.mime</tt> subpackage.  For example, the version 3 module
      <tt class="module">email.MIMEText</tt> was renamed to <tt class="module">email.mime.text</tt>.

<p>
<em>Note that the version 3 names will continue to work until Python
      2.6</em>.

<p>
</li>
<li>The <tt class="module">email.mime.application</tt> module was added, which contains the
      <tt class="class">MIMEApplication</tt> class.

<p>
</li>
<li>Methods that were deprecated in version 3 have been removed.  These
      include <tt class="method">Generator.__call__()</tt>, <tt class="method">Message.get_type()</tt>,
      <tt class="method">Message.get_main_type()</tt>, <tt class="method">Message.get_subtype()</tt>.

<p>
</li>
<li>Fixes have been added for <a class="rfc" id='rfcref-99419' xml:id='rfcref-99419'
href="http://www.faqs.org/rfcs/rfc2231.html">RFC 2231</a> support which can change some of
      the return types for <tt class="function">Message.get_param()</tt> and friends.  Under
      some circumstances, values which used to return a 3-tuple now return
      simple strings (specifically, if all extended parameter segments were
      unencoded, there is no language and charset designation expected, so the
      return type is now a simple string).  Also, %-decoding used to be done
      for both encoded and unencoded segments; this decoding is now done only
      for encoded segments.
</li>
</ul>

<p>
Here are the major differences between <tt class="module">email</tt> version 3 and version 2:

<p>

<ul>
<li>The <tt class="class">FeedParser</tt> class was introduced, and the <tt class="class">Parser</tt>
      class was implemented in terms of the <tt class="class">FeedParser</tt>.  All parsing
      therefore is non-strict, and parsing will make a best effort never to
      raise an exception.  Problems found while parsing messages are stored in
      the message's <var>defect</var> attribute.

<p>
</li>
<li>All aspects of the API which raised <tt class="exception">DeprecationWarning</tt>s in
      version 2 have been removed.  These include the <var>_encoder</var> argument
      to the <tt class="class">MIMEText</tt> constructor, the <tt class="method">Message.add_payload()</tt>
      method, the <tt class="function">Utils.dump_address_pair()</tt> function, and the
      functions <tt class="function">Utils.decode()</tt> and <tt class="function">Utils.encode()</tt>.

<p>
</li>
<li>New <tt class="exception">DeprecationWarning</tt>s have been added to:
      <tt class="method">Generator.__call__()</tt>, <tt class="method">Message.get_type()</tt>,
      <tt class="method">Message.get_main_type()</tt>, <tt class="method">Message.get_subtype()</tt>, and
      the <var>strict</var> argument to the <tt class="class">Parser</tt> class.  These are
      expected to be removed in future versions.

<p>
</li>
<li>Support for Pythons earlier than 2.3 has been removed.
</li>
</ul>

<p>
Here are the differences between <tt class="module">email</tt> version 2 and version 1:

<p>

<ul>
<li>The <tt class="module">email.Header</tt> and <tt class="module">email.Charset</tt> modules
      have been added.

<p>
</li>
<li>The pickle format for <tt class="class">Message</tt> instances has changed.
      Since this was never (and still isn't) formally defined, this
      isn't considered a backward incompatibility.  However if your
      application pickles and unpickles <tt class="class">Message</tt> instances, be
      aware that in <tt class="module">email</tt> version 2, <tt class="class">Message</tt>
      instances now have private variables <var>_charset</var> and
      <var>_default_type</var>.

<p>
</li>
<li>Several methods in the <tt class="class">Message</tt> class have been
      deprecated, or their signatures changed.  Also, many new methods
      have been added.  See the documentation for the <tt class="class">Message</tt>
      class for details.  The changes should be completely backward
      compatible.

<p>
</li>
<li>The object structure has changed in the face of
      <span class="mimetype">message/rfc822</span> content types.  In <tt class="module">email</tt>
      version 1, such a type would be represented by a scalar payload,
      i.e. the container message's <tt class="method">is_multipart()</tt> returned
      false, <tt class="method">get_payload()</tt> was not a list object, but a single
      <tt class="class">Message</tt> instance.

<p>
This structure was inconsistent with the rest of the package, so
      the object representation for <span class="mimetype">message/rfc822</span> content
      types was changed.  In <tt class="module">email</tt> version 2, the container
      <em>does</em> return <code>True</code> from <tt class="method">is_multipart()</tt>, and
      <tt class="method">get_payload()</tt> returns a list containing a single
      <tt class="class">Message</tt> item.

<p>
Note that this is one place that backward compatibility could
      not be completely maintained.  However, if you're already
      testing the return type of <tt class="method">get_payload()</tt>, you should be
      fine.  You just need to make sure your code doesn't do a
      <tt class="method">set_payload()</tt> with a <tt class="class">Message</tt> instance on a
      container with a content type of <span class="mimetype">message/rfc822</span>.

<p>
</li>
<li>The <tt class="class">Parser</tt> constructor's <var>strict</var> argument was
      added, and its <tt class="method">parse()</tt> and <tt class="method">parsestr()</tt> methods
      grew a <var>headersonly</var> argument.  The <var>strict</var> flag was
      also added to functions <tt class="function">email.message_from_file()</tt>
      and <tt class="function">email.message_from_string()</tt>.

<p>
</li>
<li><tt class="method">Generator.__call__()</tt> is deprecated; use
      <tt class="method">Generator.flatten()</tt> instead.  The <tt class="class">Generator</tt>
      class has also grown the <tt class="method">clone()</tt> method.

<p>
</li>
<li>The <tt class="class">DecodedGenerator</tt> class in the
      <tt class="module">email.Generator</tt> module was added.

<p>
</li>
<li>The intermediate base classes <tt class="class">MIMENonMultipart</tt> and
      <tt class="class">MIMEMultipart</tt> have been added, and interposed in the
      class hierarchy for most of the other MIME-related derived
      classes.

<p>
</li>
<li>The <var>_encoder</var> argument to the <tt class="class">MIMEText</tt> constructor
      has been deprecated.  Encoding  now happens implicitly based
      on the <var>_charset</var> argument.

<p>
</li>
<li>The following functions in the <tt class="module">email.Utils</tt> module have
      been deprecated: <tt class="function">dump_address_pairs()</tt>,
      <tt class="function">decode()</tt>, and <tt class="function">encode()</tt>.  The following
      functions have been added to the module:
      <tt class="function">make_msgid()</tt>, <tt class="function">decode_rfc2231()</tt>,
      <tt class="function">encode_rfc2231()</tt>, and <tt class="function">decode_params()</tt>.

<p>
</li>
<li>The non-public function <tt class="function">email.Iterators._structure()</tt>
      was added.
</li>
</ul>

<p>

<div class="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="7.1.10 Iterators"
  href="module-email.iterators.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="7.1 email  "
  href="module-email.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="7.1.12 differences from mimelib"
  href="node160.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-email.iterators.html">7.1.10 Iterators</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-email.html">7.1 email  </a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="node160.html">7.1.12 Differences from mimelib</a>
</div>
</div>
<hr />
<span class="release-info">Release 2.5.1, documentation updated on 18th April, 2007.</span>
</div>
<!--End of Navigation Panel-->
<address>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</address>
</body>
</html>
